Run-Time Type Checking for Binary Programs
نویسندگان
چکیده
Many important software systems are written in the C programming language. Unfortunately, the C language does not provide strong safety guarantees, and many common programming mistakes introduce type errors that are not caught by the compiler. These errors only manifest themselves at run time through unexpected program behavior, and it is often hard to isolate and identify their causes. This paper presents the Hobbes run-time type checker for compiled C programs. Our tool interprets compiled binaries, tracks type information for all memory and register locations, and reports warnings when a variety of type errors occur. Because the Hobbes type checker does not rely on source code, it is effective in many situations where similar tools are not, such as when full source code is not available or when C source is linked with program fragments written in assembly or other languages.
منابع مشابه
Run-time Correctness Checking Is Algorithmically Undecidable for Pointer Data Structures
Programs routinely use complicated pointer (linked list-type) data structures such as linked lists, doubly linked lists, diierent types of trees, etc. These data structures are usually deened inductively: e.g., a tree can be deened as a structure that results from an empty tree by an arbitrary sequence of adding and deleting elements. When the program runs, these data structures take dynamicall...
متن کاملDynamic Type Checking in Jalapeño
A Java virtual machine (JVM) must sometimes check whether a value of one type can be can be treated as a value of another type. The overhead for such dynamic type checking can be a signiicant factor in the running time of some Java programs. This paper presents a variety of techniques for performing these checks, each tailored to a particular restricted case that commonly arises in Java program...
متن کاملStatic Analysis of C for Hybrid Type Checking
Hybrid type checking[5] is an approach to enforcing the welltypedness of programs that, where possible, uses static analysis to determine the types of expressions, and run-time checking when the precision of static analysis is insufficeint. This approach is useful for dependent type systems in which types are parameterized by run-time values of expressions. Deputy is a dependent type system for...
متن کاملType Systems of Scripting Languages
Type systems play an important role in the design of programming languages, they prevent programs from having non-correct behavior. Typically, type systems are expressed in two ways, type-checking and type inference. The type information presented on local variables and method arguments makes the difference in choosing one technique rather than the other. Type checking is a derivation type infe...
متن کاملUSENIX Association Proceedings of the Java TM Virtual Machine Research
A Java virtual machine (JVM) must sometimes check whether a value of one type can be can be treated as a value of another type. The overhead for such dynamic type checking can be a signi cant factor in the running time of some Java programs. This paper presents a variety of techniques for performing these checks, each tailored to a particular restricted case that commonly arises in Java program...
متن کامل